package io.unicorn.modules.water.entity;

import com.alibaba.excel.annotation.ExcelIgnore;
import com.alibaba.excel.annotation.ExcelProperty;
import com.alibaba.excel.annotation.write.style.*;
import com.alibaba.excel.enums.poi.FillPatternTypeEnum;
import com.baomidou.mybatisplus.annotation.IdType;
import com.baomidou.mybatisplus.annotation.TableField;
import com.baomidou.mybatisplus.annotation.TableId;
import com.baomidou.mybatisplus.annotation.TableName;
import lombok.Data;

import java.io.Serializable;
import java.util.Date;
import java.util.LinkedHashMap;
import java.util.Map;

/**
 * ${comments}
 * 
 * @author LNCG
 * @email LNCG@USTL.EDU.CN
 * @date 2021-05-03 08:18:00
 */
@Data

@HeadStyle(fillPatternType = FillPatternTypeEnum.NO_FILL, fillForegroundColor = 10)
@HeadFontStyle(fontHeightInPoints = 10)
@ContentStyle(fillPatternType = FillPatternTypeEnum.NO_FILL, fillForegroundColor = 10)
@ContentFontStyle(fontHeightInPoints = 10)
@ColumnWidth(15)

@TableName("Gather_DB.dbo.T_Client_Info")
public class TClientInfoEntity implements Serializable {
	private static final long serialVersionUID = 1L;

	/**
	 * 设备编号
	 */
	@TableId(type = IdType.INPUT)
	@ExcelProperty("设备号")
	private String deviceId;
	@ExcelProperty("小区编码")
	@HeadStyle(fillPatternType = FillPatternTypeEnum.SOLID_FOREGROUND, fillForegroundColor = 10)
	private String memo1;
	@ExcelProperty("楼号")
	private String buildNum;
	@ExcelProperty("单元")
	private String unitNum;
	@ExcelProperty("门牌号")
	private String houseNum;
	@ExcelProperty("公安地址")
	private String proName;
	@ExcelProperty("表卡编号")
	private String clientId;
	@ExcelProperty("姓名")
	private String clientName;
	@ExcelProperty("IMEI")
	private String clientIdCard;
	/**
	 * 性别
	 */
	@ExcelIgnore
	private String clientSex;
	/**
	 * 年龄
	 */
	@ExcelProperty
	private String clientAge;
	@ExcelProperty("备注2")
	private String memo2;
	@ExcelProperty
	private String memo3;
	@ExcelProperty
	private String qrcode;
	@ExcelProperty
	private String accountNo;
	@ExcelProperty
	private String searchNo;
	@ExcelProperty
	private String phone;
	@ExcelProperty("表盘号")
	private String meterCode;
	@ExcelProperty("表封号")
	private String stampCode;
	@ExcelProperty("口径")
	@HeadStyle(fillPatternType = FillPatternTypeEnum.SOLID_FOREGROUND, fillForegroundColor = 10)
	private String calibre;
	@ExcelProperty
	private String clientType;
	@ExcelProperty
	private String deviceCode;
	@ExcelProperty
	private String buildingNo;
	@ExcelProperty
	private String floorNo;
	@ExcelProperty
	private String otherNo;

	@ExcelProperty("安装日期")
	private String desc1;

	@ExcelProperty("使用性质")
	@HeadStyle(fillPatternType = FillPatternTypeEnum.SOLID_FOREGROUND, fillForegroundColor = 10)
	private String desc2;

	@ExcelProperty("换表时指针数")
	private String desc3;

	@ExcelProperty("水表类型")
	@HeadStyle(fillPatternType = FillPatternTypeEnum.SOLID_FOREGROUND, fillForegroundColor = 10)
	private String desc4;

	@ExcelProperty("安装位置")
	@HeadStyle(fillPatternType = FillPatternTypeEnum.SOLID_FOREGROUND, fillForegroundColor = 10)
	private String desc5;

	@ExcelProperty("质保开始日期")
	private String desc6;

	@ExcelProperty("现场记录")
	private String desc7;

	@ExcelProperty("出账")
	private String desc8;

	@ExcelProperty("维护人员")
	private String desc9;

	@ExcelProperty("维护人员电话")
	private String desc10;

	@ExcelProperty("主机通道")
	private String desc11;
	@ExcelProperty("二管号")
	private String desc12;
	@ExcelProperty("采集板号")
	private String desc13;
	@ExcelProperty("通道号")
	private String desc14;
	@ExcelProperty("表号")
	private String desc15;

	@ExcelProperty("SIM卡号")
	private String desc16;
	@ExcelIgnore
	private String desc17;
	@ExcelIgnore
	private String desc18;
	@ExcelIgnore
	private String desc19;
	@ExcelIgnore
	private String desc20;

	@TableField(exist=false)
	private String clientAddress;
	@TableField(exist=false)
	private String deviceAddress;
	@TableField(exist=false)
	private TDeviceInfoEntity clientDeviceInfo;

	public static Map<String, String> getHeadName(){
		Map<String, String> headMap = new LinkedHashMap<String, String>();

		headMap.put("deviceId","设备号");
		headMap.put("memo1","小区编码");
		headMap.put("buildNum","楼号");
		headMap.put("unitNum","单元");
		headMap.put("houseNum","门牌号");
		headMap.put("proName","公安地址");

		headMap.put("clientId","表卡编号");
		headMap.put("clientName","姓名");

		headMap.put("clientSex","性别");
		headMap.put("clientAge","年龄");

		headMap.put("desc11","主机通道");
		headMap.put("desc12","二管号");
		headMap.put("desc13","采集板号");
		headMap.put("desc14","通道号");
		headMap.put("desc15","表号");

		headMap.put("clientIdCard","IMEI");
		headMap.put("meterCode","表盘号");
		headMap.put("stampCode","表封号");
		headMap.put("calibre","口径");

		headMap.put("desc1","安装日期");
		headMap.put("desc2","使用性质");
		headMap.put("desc4","水表类型");
		headMap.put("desc5","安装位置");
		headMap.put("desc3","换表时指针数");
		headMap.put("desc6","质保开始日期");
		headMap.put("desc7","现场记录");
		headMap.put("desc8","出账");
		headMap.put("desc9","维护人员");
		headMap.put("desc10","维护人员电话");

		headMap.put("memo2","备注2");
		headMap.put("memo3","备注3");
		headMap.put("qrcode","二维码");

		headMap.put("accountNo","账本");
		headMap.put("searchNo","客户（查询）号");
		headMap.put("phone","电话");

		headMap.put("clientType","用户性质");
		headMap.put("deviceCode","设备代码");
		headMap.put("buildingNo","小楼号");
		headMap.put("floorNo","楼层");
		headMap.put("otherNo","其他码");
		headMap.put("desc16","SIM卡号");


		return headMap;
	};

}
